package com.mzp.XbShop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mzp.XbShop.pojo.UserCart;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Description user_cart 数据访问接口
 * @date 2021-04-20 10:01:19
*/
@Repository
public interface UserCartDao extends BaseMapper<UserCart> {

    List<Map<String, Object>> findByCartId(String userid);

    UserCart exits(String goodsid, String userid);

    void deleteCar(String goodsid, String userid);

    Integer updateCart(String goodsid, String userid, Integer goodstotal);

    List<Map<String, Object>> findByCartIdAndWaitPay(String userid);

    void deleteWaitCar(String goodsid, String userid);

    void subOrder(String goodsid, String userid, String goodstotal);
}

